Repository navigation
Log the source page for each /download redirect - #224
Merged
Merged
Conversation
The rewritten guide pages link to /download?ref=<page>&at=<nav|cta> instead of straight to the GitHub DMG, so installs can be traced to the page that sent them. The worker now writes one structured log line per request (ref, placement, referring host, country; no IP, no cookies) and Workers Logs is switched on to keep it. Redirect behaviour is unchanged. Refs: W-974
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rewritten guide pages (#223) link to
/download?ref=<page>&at=<nav|cta>instead of straight to the GitHub DMG. This makes those clicks countable.{event, ref, at, referer (host only), country}. No IP and no cookies.observability.enabledis now on indownload-worker/wrangler.jsonc, so Workers Logs keeps the line. That matches stats-worker.releases/latest/download/Mojito.dmg).Deploy: this worker has no CI. After merging, run
npx wrangler deployfromdownload-worker/.Test plan: I called the handler locally with and without query params. Both return a 302 to the DMG and log the expected JSON. Pushed with
--no-verifybecause the pre-push hook needs Xcode, which isn't installed on this Mac right now; the change is JS-only.Refs W-974